package my.package0407;

import java.util.Scanner;

public class dome7 {
    public static void main(String[] args) {
        Scanner SC=new Scanner(System.in);
        System.out.println("Please enter the value of n:");
        int n =SC.nextInt();
        System.out.println(getmath( n));
    }
    public static  int getmath(int n) {
        int sum =1;
        if(n < 0){
            System.out.println("Negative numbers have no class!");
        }else if (n==1||n==0){
            System.out.println(n +"class for 1");
        }else{
            for(int i =0;i<n;i++){
                sum +=i;
            }return sum;
        }return sum;
    }
}
